//
//  Const.swift
//  WechatTesting
//
//  Created by TmmmS on 2019/10/13.
//  Copyright © 2019 TMS. All rights reserved.
//

import UIKit

// 屏幕的宽度
let SCREEN_WIDTH = UIScreen.main.bounds.size.width

// 屏幕的高度
let SCREEN_HEIGHT = UIScreen.main.bounds.size.height

//状态栏高度
let STATUSBAR_HEIGHT = UIApplication.shared.statusBarFrame.height

//导航栏高度:通用
let NAVIGATIONBAR_HEIGHT = UINavigationController().navigationBar.frame.size.height

//判断是否iphoneX
let T_IPHONEX_ALL = (STATUSBAR_HEIGHT > 20) ? true : false

//导航栏高度
let T_NAVBARHEIGHT = (Double(STATUSBAR_HEIGHT + 44.0))

//Tabbar高度
let T_TABBARHEIGHT = T_IPHONEX_ALL ? Double(83.0) : Double(49.0)

//安全区高度
let T_SafeArea_BottomHeight = (T_IPHONEX_ALL ? 34 : 0)
//
////宽度比例
//func T_ScaleWidth(_ font:CGFloat) -> (CGFloat) {
//
//    let screenW = SCREEN_WIDTH > 375 ? 375 : SCREEN_WIDTH
//    return (screenW/375)*font
//
//}
//
////高度比例
//func T_ScaleHeight(_ font:CGFloat) -> (CGFloat) {
//
//    let screenH = SCREEN_HEIGHT > 667 ? 667 : SCREEN_HEIGHT
//    return screenH/667*font
//
//}

//屏幕比例
func T_ScreenScale() -> (CGFloat) {
    
    let screenW = SCREEN_WIDTH > 375 ? 375 : SCREEN_WIDTH
    return screenW/375

}

